import React from 'react';
import './ScrollButton.css'

interface ScrollButtonProps {
    direction: 'left' | 'right';
    onClick: () => void;
    visible: boolean;
}

const ScrollButton: React.FC<ScrollButtonProps> = ({ direction, onClick, visible }) => {
    if (!visible) return null;

    return (
        <button className={`scroll-button ${direction}`} onClick={onClick}>
            {direction === 'left' ? '<' : '>'}
        </button>
    );
};

export default ScrollButton;